<%@ page contentType="text/html;charset=UTF-8" %>
<%@ include file="/WEB-INF/views/include/taglib.jsp" %>
<html>
<head>
    <title>${pmDataDict.dictName}管理</title>
    <meta name="decorator" content="default"/>
    <script type="text/javascript">
        $(document).ready(function () {

        });

        function page(n, s) {
            $("#pageCurrent").val(n);
            $("#pageSize").val(s);
            $("#searchForm").submit();
            return false;
        }
    </script>
</head>
<body>
<ul class="nav nav-tabs">
    <li class="active"><a href="${ctx}/pm/pmDataDictItem/list?dictCode=${pmDataDict.dictCode}">${pmDataDict.dictName}列表</a></li>
    <shiro:hasPermission name="pm:pmDataDictItem:edit">
        <li><a href="${ctx}/pm/pmDataDictItem/form?dictCode=${pmDataDict.dictCode}">${pmDataDict.dictName}添加</a></li>
    </shiro:hasPermission>
</ul>
<form:form id="searchForm" modelAttribute="pmDataDictItem" action="${ctx}/pm/pmDataDictItem/" method="post" class="breadcrumb form-search">
    <input id="pageCurrent" name="pageCurrent" type="hidden" value="${page.current}"/>
    <input id="pageSize" name="pageSize" type="hidden" value="${page.size}"/>
    <ul class="ul-form">
        <form:hidden path="dictCode" value="${pmDataDict.dictCode}"/>
        <li><label>编号：</label>
            <form:input path="itemCode" htmlEscape="false" maxlength="30" class="input-medium"/>
        </li>
        <li><label>名称：</label>
            <form:input path="itemName" htmlEscape="false" maxlength="255" class="input-medium"/>
        </li>
        <li class="btns"><input id="btnSubmit" class="btn btn-primary" type="submit" value="查询"/></li>
        <li class="clearfix"></li>
    </ul>
</form:form>
<sys:message content="${message}"/>
<table id="contentTable" class="table table-striped table-bordered table-condensed">
    <thead>
    <tr>
        <th>编号</th>
        <th>名称</th>
        <c:if test="${'Y' == pmDataDict.extAttr1List}">
            <th>${pmDataDict.extAttr1Name}</th>
        </c:if>
        <c:if test="${'Y' == pmDataDict.extAttr2List}">
            <th>${pmDataDict.extAttr2Name}</th>
        </c:if>
        <c:if test="${'Y' == pmDataDict.extAttr3List}">
            <th>${pmDataDict.extAttr3Name}</th>
        </c:if>
        <c:if test="${'Y' == pmDataDict.extAttr4List}">
            <th>${pmDataDict.extAttr4Name}</th>
        </c:if>
        <c:if test="${'Y' == pmDataDict.extAttr5List}">
            <th>${pmDataDict.extAttr5Name}</th>
        </c:if>
        <c:if test="${'Y' == pmDataDict.extAttr6List}">
            <th>${pmDataDict.extAttr6Name}</th>
        </c:if>
        <c:if test="${'Y' == pmDataDict.extAttr7List}">
            <th>${pmDataDict.extAttr7Name}</th>
        </c:if>
        <th>排序</th>
        <th>备注</th>
        <shiro:hasPermission name="pm:pmDataDictItem:edit">
            <th>操作</th>
        </shiro:hasPermission>
    </tr>
    </thead>
    <tbody>
    <c:forEach items="${page.records}" var="pmDataDictItem">
        <tr>
            <td>
                    ${pmDataDictItem.itemCode}
            </td>
            <td>
                    ${pmDataDictItem.itemName}
            </td>
            <c:if test="${'Y' == pmDataDict.extAttr1List}">
                <td>${pmDataDictItem.extAttr1}</td>
            </c:if>
            <c:if test="${'Y' == pmDataDict.extAttr2List}">
                <td>${pmDataDictItem.extAttr2}</td>
            </c:if>
            <c:if test="${'Y' == pmDataDict.extAttr3List}">
                <td>${pmDataDictItem.extAttr3}</td>
            </c:if>
            <c:if test="${'Y' == pmDataDict.extAttr4List}">
                <td>${pmDataDictItem.extAttr4}</td>
            </c:if>
            <c:if test="${'Y' == pmDataDict.extAttr5List}">
                <td>${pmDataDictItem.extAttr5}</td>
            </c:if>
            <c:if test="${'Y' == pmDataDict.extAttr6List}">
                <td>${pmDataDictItem.extAttr6}</td>
            </c:if>
            <c:if test="${'Y' == pmDataDict.extAttr7List}">
                <td>${pmDataDictItem.extAttr7}</td>
            </c:if>
            <td>
                    ${pmDataDictItem.sort}
            </td>
            <td>
                    ${pmDataDictItem.remarks}
            </td>
            <shiro:hasPermission name="pm:pmDataDictItem:edit">
                <td>
                    <a href="${ctx}/pm/pmDataDictItem/form?id=${pmDataDictItem.id}&dictCode=${pmDataDict.dictCode}">修改</a>
                    <a href="${ctx}/pm/pmDataDictItem/delete?id=${pmDataDictItem.id}" onclick="return confirmx('确认要删除该条数据吗？', this.href)">删除</a>
                </td>
            </shiro:hasPermission>
        </tr>
    </c:forEach>
    </tbody>
</table>
<div class="pagination">${page}</div>
</body>
</html>